/**
 * 
 */
package br.com.ufrn.aipetro.ga.model.persist.hibernate;

import br.com.ufrn.aipetro.ga.domain.entity.device.Critical;
import br.com.ufrn.aipetro.ga.domain.entity.device.Device;
import br.com.ufrn.aipetro.ga.domain.entity.device.OperationStatus;
import br.com.ufrn.aipetro.ga.domain.entity.device.Protocol;
import br.com.ufrn.aipetro.ga.domain.entity.device.actuator.bomb.Bomb;
import br.com.ufrn.aipetro.ga.domain.entity.device.actuator.valve.Valve;
import br.com.ufrn.aipetro.ga.domain.entity.device.controller.Controller;
import br.com.ufrn.aipetro.ga.domain.entity.device.maintenance.Cause;
import br.com.ufrn.aipetro.ga.domain.entity.device.maintenance.Maintenance;
import br.com.ufrn.aipetro.ga.domain.entity.device.maintenance.MaintenanceType;
import br.com.ufrn.aipetro.ga.domain.entity.device.maintenance.ServiceNote;
import br.com.ufrn.aipetro.ga.domain.entity.device.maintenance.Team;
import br.com.ufrn.aipetro.ga.domain.entity.device.maintenance.TypeOrder;
import br.com.ufrn.aipetro.ga.domain.entity.device.sensor.sensorlevel.SensorLevel;
import br.com.ufrn.aipetro.ga.domain.entity.device.sensor.Sensor;
import br.com.ufrn.aipetro.ga.domain.entity.device.sensor.sensortemperature.SensorTemperature;
import br.com.ufrn.aipetro.ga.domain.entity.manufacturer.Manufacturer;
import br.com.ufrn.aipetro.ga.domain.entity.mesh.Mesh;
import br.com.ufrn.aipetro.ga.domain.entity.plant.Plant;
import br.com.ufrn.aipetro.ga.domain.entity.stock.Part;
import br.com.ufrn.aipetro.ga.domain.entity.unit.Unit;
import br.com.ufrn.aipetro.ga.model.persist.hibernate.util.HibernateUtil;
import br.com.ufrn.aipetro.ga.persist.interfaces.BombDao;
import br.com.ufrn.aipetro.ga.persist.interfaces.CauseDao;
import br.com.ufrn.aipetro.ga.persist.interfaces.ControllerDao;
import br.com.ufrn.aipetro.ga.persist.interfaces.CriticalDao;
import br.com.ufrn.aipetro.ga.persist.interfaces.DaoFactory;
import br.com.ufrn.aipetro.ga.persist.interfaces.DeviceDao;
import br.com.ufrn.aipetro.ga.persist.interfaces.MaintenanceDao;
import br.com.ufrn.aipetro.ga.persist.interfaces.MaintenanceTypeDao;
import br.com.ufrn.aipetro.ga.persist.interfaces.ManufacturerDao;
import br.com.ufrn.aipetro.ga.persist.interfaces.MeshDao;
import br.com.ufrn.aipetro.ga.persist.interfaces.OperationStatusDao;
import br.com.ufrn.aipetro.ga.persist.interfaces.PartDao;
import br.com.ufrn.aipetro.ga.persist.interfaces.PlantDao;
import br.com.ufrn.aipetro.ga.persist.interfaces.ProtocolDao;
import br.com.ufrn.aipetro.ga.persist.interfaces.SensorDao;
import br.com.ufrn.aipetro.ga.persist.interfaces.SensorTemperatureDao;
import br.com.ufrn.aipetro.ga.persist.interfaces.ServiceNoteDao;
import br.com.ufrn.aipetro.ga.persist.interfaces.TeamDao;
import br.com.ufrn.aipetro.ga.persist.interfaces.SensorLevelDao;
import br.com.ufrn.aipetro.ga.persist.interfaces.TypeOrderDao;
import br.com.ufrn.aipetro.ga.persist.interfaces.UnitDao;
import br.com.ufrn.aipetro.ga.persist.interfaces.ValveDao;


/**
 * @author Lucas
 *
 */
public class HibernateDaoFactory implements DaoFactory {
	
	/**
	 * 
	 */
	public HibernateDaoFactory() {
	}

	@Override
	public UnitDao createUnitDao() {
		return new HibernateUnitDao(Unit.class);
	}

	@Override
	public PlantDao createPlantDao() {
		return new HibernatePlantDao(Plant.class);
	}

	@Override
	public MeshDao createMeshDao() {
		return new HibernateMeshDao(Mesh.class);
	}
	
	@Override
	public DeviceDao createDeviceDao() {
		return new HibernateDeviceDao(Device.class);
	}

	@Override
	public ControllerDao createControllerDao() {
		return new HibernateControllerDao(Controller.class);
	}

	@Override
	public ValveDao createValveDao() {
		return new HibernateValveDao(Valve.class);
	}

	@Override
	public SensorLevelDao createSensorLevelDao() {
		return new HibernateSensorLevelDao(SensorLevel.class);
	}

	@Override
	public OperationStatusDao createOperationStatusDao() {
		return new HibernateOperationStatusDao(OperationStatus.class);
	}
	
	@Override
	public CriticalDao createCriticalDao() {
		return new HibernateCriticalDao(Critical.class);
	}
	
	@Override
	public BombDao createBombDao() {
		return new HibernateBombDao(Bomb.class);
	}

	@Override
	public ProtocolDao createProtocolDao() {
		return new HibernateProtocolDao(Protocol.class);
	}
	
	@Override
	public ServiceNoteDao createServiceNoteDao() {
		return new HibernateServiceNoteDao(ServiceNote.class);
	}

	@Override
	public MaintenanceDao createMaintenanceDao() {
		return new HibernateMaintenanceDao(Maintenance.class);
	}

	@Override
	public MaintenanceTypeDao createMaintenanceTypeDao() {
		return new HibernateMaintenanceTypeDao(MaintenanceType.class);
	}
	
	@Override
	public TypeOrderDao createTypeOrderDao() {
		return new HibernateTypeOrderDao(TypeOrder.class);
	}

	@Override
	public CauseDao createCauseDao() {
		return new HibernateCauseDao(Cause.class);
	}

	@Override
	public TeamDao createTeamDao() {
		return new HibernateTeamDao(Team.class);
	}

	@Override
	public PartDao createPartDao() {
		return new HibernatePartDao(Part.class);
	}
	
	@Override
	public SensorTemperatureDao createSensorTemperatureDao() {
		return new HibernateSensorTemperatureDao(SensorTemperature.class);
	}
	
	@Override
	public ManufacturerDao createManufacturerDao() {
		return new HibernateManufacturerDao(Manufacturer.class);
	}
	
	@Override
	public SensorDao createSensorDao() {
		return new HibernateSensorDao(Sensor.class);
	}
	

	@Override
	public void beginTransaction() {
		HibernateUtil.beginTransaction();
	}

	@Override
	public void commitTransaction() {
		HibernateUtil.commitTransaction();
	}


	
}
